public class Demo {
    public static void main(String[] args) {
        MyThread thread = new MyThread();
        thread.start();
        System.out.println("a");
    }
}

class MyThread extends Thread {
    @Override
    public void run() {
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("b");
    }
}